var err_message_list={
    1:"请输入账号",
    2:"请输入密码",
    3:"请输入正确的手机号码",
    4:"请先获取动态密码",
    5:"短信验证码错误",
    6:"登录超时，请刷新后重试",
    7:"账号或密码错误。请找回密码或查看帮助",
    8:"请拖动下方滑块",
    9:"请拖动滑块，完成验证",
    10:"账号或密码错误，再错3次将锁定30分钟",
}

window.onload=function () {
    var oBtn = document.getElementById("btn");
    var o_country_btn = document.getElementById("country_btn");
    /*账户密码登陆 与手机登陆切换*/
    var flag = true;/*手机登陆时flag=false   账户登陆flag=true*/
    var o_login_account=document.getElementsByClassName("mod_little_login_body_account");
    var o_login_password=document.getElementsByClassName("mod_little_login_body_password");
    function login_account_or_phone() {
        if (flag){
            o_login_account[0].style.display = "none";
            o_login_account[1].style.display = "block";
            o_login_password[0].style.display = "none";
            o_login_password[1].style.display = "block";
        }
        else {
            o_login_account[0].style.display = "block";
            o_login_account[1].style.display = "none";
            o_login_password[0].style.display = "block";
            o_login_password[1].style.display = "none";
        }
        flag = !flag;
        document.getElementsByClassName("country_container")[0].style.display = "none";
    }
    oBtn.onclick = login_account_or_phone;
    /*国家菜单切换*/
    var country_flag=true;
    function login_country() {
        if (country_flag&&!flag) {
            document.getElementsByClassName("country_container")[0].style.display = "block";
        }
        else {
            document.getElementsByClassName("country_container")[0].style.display = "none";
        }
        country_flag = !country_flag;
    }
    o_country_btn.onclick = login_country;

    /*错误信息输出*/
    var oErrContent=document.getElementsByClassName("err_content")[0];
    var oErrMessage=oErrContent.getElementsByTagName("p")[0];
    /*
        var err_message_list={
        1:"请输入账号",
        2:"请输入密码",
        3:"请输入正确的手机号码",
        4:"请先获取动态密码",
        5:"短信验证码错误",
        6:"登录超时，请刷新后重试",
        7:"账号或密码错误。请找回密码或查看帮助",
        8:"请拖动下方滑块",
        9:"请拖动滑块，完成验证",
        10:"账号或密码错误，再错3次将锁定30分钟",
    }
    */

    function err_message(list_num){
        oErrMessage.innerHTML=err_message_list[list_num];
    }

    function clear_err_message(){
        oErrContent.style.display = "none";
    }
};

